package com.moweilin.mo_gateway;

import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import com.moweilin.mo_gateway.spi.impl.DefaultConfigProvider;
import com.moweilin.mo_utils.cli.CommandFactory;
import org.slf4j.LoggerFactory;

/**
 * Created by moweilin on 2017/1/27.
 */
public class MoGatewayApplication {
    public static void main(String[] args) {
        Logger logger = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
        logger.setLevel(Level.INFO);

        CommandFactory commandFactory = new CommandFactory(MoGatewayApplication.class, DefaultConfigProvider.getInstance().getResource());
        commandFactory.register(StartCommand.class,s->{
//            IModuleService moduleService = SimpleModuleService.getInstance();
//            moduleService.add()
            s.startServer();

        });
        commandFactory.run(args);
    }

}
